package com.eight.feign;

import com.eight.pojo.TbOrder;
import com.eight.vo.ComResult;
import io.swagger.models.auth.In;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient("rentcar-rent")
public interface CarOrderFeign {
    /**
     * 远程查询订单状态的费恩
     *
     * @param uuid 订单的uuid
     * @return 查询的订单结果
     */
    @GetMapping("/rent/order/getOrderByUuid/{uuid}")
    TbOrder getOrderByUuid(@PathVariable String uuid);

    /**
     * 跟新订单状态的接口方法
     * @param state 新的状态
     * @param uuid 订单的uuid
     * @return 执行的结果
     */
    @GetMapping("/rent/order/changeStateByUuid/{uuid}/{state}")
    ComResult changeStateByUuid(@PathVariable Integer state, @PathVariable String uuid);
}
